Use Peripherals to Provide Input Data to the Client Application
Data from peripherals is returned to the Pos Application through events.
Add a reference to:Ncr.As.Interfaces.InputManagerInterfaces.dll
using Ncr.Managers.InputManager;
// register with the DeviceManager to catch events when input data is available.
deviceManager.DataReceivedEvent += deviceManager_DataReceivedEvent;
void deviceManager_DataReceivedEvent(IInputTuple inputData)
{
// Save the input data received in the input tuple
}
// create a list to hold all of the valid termination keys for the current
// user prompt. All input devices identify termination keys in the devicemanager.xml
// file. These values are key to turning on devices for particular prompts.
Collection<string> validInputTerminators = new Collection<string>();
// The strings Scanner and Msr are used in the devicemanager.xml file.
validInputTerminators.Add("Scanner");
validInputTerminators.Add("Msr");
// Tell the device manager we are looking for input from the list of devices.
deviceManager.StartInputProcess(validInputTerminators);
// when satisfactory input data has been received, instruct the device manager to quit //prompting for data.
deviceManager.StopInputProcess();